import type { IPost } from '@/interfaces';
import { useContext } from 'react';
import { HomePageContext } from '@/contexts/home';
import PostList from '@/app/[locale]/common/post/list';

export default function PostHome({ items = [] }: { items?: IPost[] }) {
  const context = useContext(HomePageContext);
  const metadata = context.metadata!;

  return <PostList items={items} metadata={metadata} />;
}
